import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;
@WebServlet("/h")
public class test extends HttpServlet {
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
            throws IOException
    {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        Map<String, String[]> map=request.getParameterMap();
        for (Map.Entry<String,String[]>  o : map.entrySet()){
            out.println("<p>"+o.getKey());
            for (String s : o.getValue()){
                out.println(","+s);
            }
            out.println("</p><br>");
        }

    }
}
